package com.cug.nageoffer.user.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cug.nageoffer.model.entity.ResumeRecord;
import com.cug.nageoffer.model.vo.Result;
import com.cug.nageoffer.model.vo.ResultCodeEnum;
import com.cug.nageoffer.user.mapper.ResumeRecordMapper;
import com.cug.nageoffer.user.service.ResumeRecordService;
import org.springframework.stereotype.Service;

@Service
public class ResumeRecordServiceImpl extends ServiceImpl<ResumeRecordMapper, ResumeRecord> implements ResumeRecordService {
    @Override
    public Result<String> send(ResumeRecord requestParam) {
        save(requestParam);
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }

    @Override
    public Result<Long> countRecord(Long userId) {
        Long count = query().eq("seeker_id", userId).count();
        return Result.build(count,ResultCodeEnum.SUCCESS);
    }
}
